\(\int \frac {1}{a+a \csc (c+d x)} \, dx\) [6]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 28 \[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {x}{a}+\frac {\cot (c+d x)}{d (a+a \csc (c+d x))} \]

[Out]

x/a+cot(d*x+c)/d/(a+a*csc(d*x+c))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3862, 8} \[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {\cot (c+d x)}{d (a \csc (c+d x)+a)}+\frac {x}{a} \]

[In]

Int[(a + a*Csc[c + d*x])^(-1),x]

[Out]

x/a + Cot[c + d*x]/(d*(a + a*Csc[c + d*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3862

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[(-Cot[c + d*x])*((a + b*Csc[c + d*x])^n/(d*
(2*n + 1))), x] + Dist[1/(a^2*(2*n + 1)), Int[(a + b*Csc[c + d*x])^(n + 1)*(a*(2*n + 1) - b*(n + 1)*Csc[c + d*
x]), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && LeQ[n, -1] && IntegerQ[2*n]

Rubi steps \begin{align*} \text {integral}& = \frac {\cot (c+d x)}{d (a+a \csc (c+d x))}+\frac {\int a \, dx}{a^2} \\ & = \frac {x}{a}+\frac {\cot (c+d x)}{d (a+a \csc (c+d x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.26 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.68 \[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {c+d x-\frac {2 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )}}{a d} \]

[In]

Integrate[(a + a*Csc[c + d*x])^(-1),x]

[Out]

(c + d*x - (2*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))/(a*d)

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.28 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04

method result size
risch \(\frac {x}{a}+\frac {2}{d a \left (i+{\mathrm e}^{i \left (d x +c \right )}\right )}\) \(29\)
derivativedivides \(\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}}{d a}\) \(37\)
default \(\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}}{d a}\) \(37\)
parallelrisch \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) x d +d x -2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) \(48\)
norman \(\frac {\frac {x}{a}+\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}\) \(52\)

[In]

int(1/(a+a*csc(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

x/a+2/d/a/(I+exp(I*(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.93 \[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {d x + {\left (d x + 1\right )} \cos \left (d x + c\right ) + {\left (d x - 1\right )} \sin \left (d x + c\right ) + 1}{a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d} \]

[In]

integrate(1/(a+a*csc(d*x+c)),x, algorithm="fricas")

[Out]

(d*x + (d*x + 1)*cos(d*x + c) + (d*x - 1)*sin(d*x + c) + 1)/(a*d*cos(d*x + c) + a*d*sin(d*x + c) + a*d)

Sympy [F]

\[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {\int \frac {1}{\csc {\left (c + d x \right )} + 1}\, dx}{a} \]

[In]

integrate(1/(a+a*csc(d*x+c)),x)

[Out]

Integral(1/(csc(c + d*x) + 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.79 \[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {2 \, {\left (\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}}\right )}}{d} \]

[In]

integrate(1/(a+a*csc(d*x+c)),x, algorithm="maxima")

[Out]

2*(arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a + 1/(a + a*sin(d*x + c)/(cos(d*x + c) + 1)))/d

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.14 \[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {\frac {d x + c}{a} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \]

[In]

integrate(1/(a+a*csc(d*x+c)),x, algorithm="giac")

[Out]

((d*x + c)/a + 2/(a*(tan(1/2*d*x + 1/2*c) + 1)))/d

Mupad [B] (verification not implemented)

Time = 18.40 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {1}{a+a \csc (c+d x)} \, dx=\frac {x}{a}+\frac {2}{a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \]

[In]

int(1/(a + a/sin(c + d*x)),x)

[Out]

x/a + 2/(a*d*(tan(c/2 + (d*x)/2) + 1))